<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');session_start();

class Main extends CI_Controller {

	private $logged = false;

	public function index(){
		$this->load->view('login_view');
	}

	public function logger(){
		$user_field = $this->input->post('user-field');
		$pass_field = $this->input->post('pass-field');
		if($this->User_Model->isUserExist($user_field,$pass_field)){
			$this->load->view('home');
		}else{
			$this->load->view('login_view');
		}		
	}
}
